{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/shanhe33/Dropbox/Durability_Gap_Data&Replication/bulb_numerical.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}18 Jan 2024, 15:12:44

{com}. use "/Users/shanhe33/Dropbox/Durability_Gap_Data&Replication/bulb.dta"

.  
. drop if avg_price >=40
{txt}(5 observations deleted)

{com}. drop if lifetime_yr>30
{txt}(0 observations deleted)

{com}. *Figure 1 

. label variable avg_price  "Average bulb price"

. twoway scatter avg_price lifetime_yr || lfit avg_price lifetime_yr, xtitle(Lifetime in Years) ytitle(Average Price in Dollars)
{res}
{com}. *regresssion 

. reg avg_price lifetime_yr, robust

{txt}Linear regression                               Number of obs     = {res}     4,295
                                                {txt}F(1, 4293)        =  {res}   946.49
                                                {txt}Prob > F          = {res}    0.0000
                                                {txt}R-squared         = {res}    0.2627
                                                {txt}Root MSE          =    {res} 3.7744

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}   avg_price{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 1}lifetime_yr {c |}{col 14}{res}{space 2} .3009294{col 26}{space 2} .0097815{col 37}{space 1}   30.77{col 46}{space 3}0.000{col 54}{space 4} .2817525{col 67}{space 3} .3201062
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 2.199031{col 26}{space 2} .0789302{col 37}{space 1}   27.86{col 46}{space 3}0.000{col 54}{space 4} 2.044287{col 67}{space 3} 2.353775
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{com}. reg avg_price lifetime_yr i.type i.base i.shape energy_star color_temp brightness energy_use, robust

{txt}Linear regression                               Number of obs     = {res}     2,105
                                                {txt}F(18, 2086)       =  {res}    85.33
                                                {txt}Prob > F          = {res}    0.0000
                                                {txt}R-squared         = {res}    0.4567
                                                {txt}Root MSE          =    {res} 2.8552

{txt}{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}    Robust
{col 1}    avg_price{col 15}{c |}      Coef.{col 27}   Std. Err.{col 39}      t{col 47}   P>|t|{col 55}     [95% Con{col 68}f. Interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}lifetime_yr {c |}{col 15}{res}{space 2}   .30472{col 27}{space 2}  .026777{col 38}{space 1}   11.38{col 47}{space 3}0.000{col 55}{space 4} .2522077{col 68}{space 3} .3572324
{txt}{space 13} {c |}
{space 9}type {c |}
incandescent  {c |}{col 15}{res}{space 2}-1.714964{col 27}{space 2} .3983785{col 38}{space 1}   -4.30{col 47}{space 3}0.000{col 55}{space 4}-2.496225{col 68}{space 3} -.933703
{txt}{space 9}led  {c |}{col 15}{res}{space 2}-1.233129{col 27}{space 2}  .330605{col 38}{space 1}   -3.73{col 47}{space 3}0.000{col 55}{space 4}-1.881479{col 68}{space 3}-.5847793
{txt}{space 13} {c |}
{space 9}base {c |}
{space 9}e17  {c |}{col 15}{res}{space 2} .1917751{col 27}{space 2} .3192344{col 38}{space 1}    0.60{col 47}{space 3}0.548{col 55}{space 4}-.4342761{col 68}{space 3} .8178264
{txt}{space 9}e26  {c |}{col 15}{res}{space 2} .0500966{col 27}{space 2}  .198515{col 38}{space 1}    0.25{col 47}{space 3}0.801{col 55}{space 4}-.3392114{col 68}{space 3} .4394046
{txt}{space 13} {c |}
{space 8}shape {c |}
{space 11}c  {c |}{col 15}{res}{space 2} .5090142{col 27}{space 2}   .21759{col 38}{space 1}    2.34{col 47}{space 3}0.019{col 55}{space 4} .0822981{col 68}{space 3} .9357303
{txt}{space 11}g  {c |}{col 15}{res}{space 2} .8908849{col 27}{space 2} .1658047{col 38}{space 1}    5.37{col 47}{space 3}0.000{col 55}{space 4}  .565725{col 68}{space 3} 1.216045
{txt}{space 9}par  {c |}{col 15}{res}{space 2} 4.953191{col 27}{space 2}  .360821{col 38}{space 1}   13.73{col 47}{space 3}0.000{col 55}{space 4} 4.245584{col 68}{space 3} 5.660798
{txt}{space 11}r  {c |}{col 15}{res}{space 2} 2.090598{col 27}{space 2} .2565032{col 38}{space 1}    8.15{col 47}{space 3}0.000{col 55}{space 4} 1.587569{col 68}{space 3} 2.593627
{txt}{space 10}rs  {c |}{col 15}{res}{space 2} 1.487137{col 27}{space 2} .3995701{col 38}{space 1}    3.72{col 47}{space 3}0.000{col 55}{space 4} .7035392{col 68}{space 3} 2.270734
{txt}{space 11}s  {c |}{col 15}{res}{space 2} 2.021256{col 27}{space 2} .2866743{col 38}{space 1}    7.05{col 47}{space 3}0.000{col 55}{space 4} 1.459058{col 68}{space 3} 2.583453
{txt}{space 10}st  {c |}{col 15}{res}{space 2} .9067903{col 27}{space 2} .5230976{col 38}{space 1}    1.73{col 47}{space 3}0.083{col 55}{space 4}-.1190573{col 68}{space 3} 1.932638
{txt}{space 11}t  {c |}{col 15}{res}{space 2} 1.599217{col 27}{space 2} .3365368{col 38}{space 1}    4.75{col 47}{space 3}0.000{col 55}{space 4}  .939234{col 68}{space 3}   2.2592
{txt}{space 7}twist  {c |}{col 15}{res}{space 2}-1.430591{col 27}{space 2} .3287271{col 38}{space 1}   -4.35{col 47}{space 3}0.000{col 55}{space 4}-2.075258{col 68}{space 3}-.7859235
{txt}{space 13} {c |}
{space 2}energy_star {c |}{col 15}{res}{space 2}-1.410225{col 27}{space 2} .1846683{col 38}{space 1}   -7.64{col 47}{space 3}0.000{col 55}{space 4}-1.772379{col 68}{space 3}-1.048072
{txt}{space 3}color_temp {c |}{col 15}{res}{space 2}-.0001781{col 27}{space 2} .0000723{col 38}{space 1}   -2.46{col 47}{space 3}0.014{col 55}{space 4}  -.00032{col 68}{space 3}-.0000363
{txt}{space 3}brightness {c |}{col 15}{res}{space 2} .0014837{col 27}{space 2}  .000279{col 38}{space 1}    5.32{col 47}{space 3}0.000{col 55}{space 4} .0009365{col 68}{space 3} .0020308
{txt}{space 3}energy_use {c |}{col 15}{res}{space 2} .0122805{col 27}{space 2} .0061879{col 38}{space 1}    1.98{col 47}{space 3}0.047{col 55}{space 4} .0001454{col 68}{space 3} .0244155
{txt}{space 8}_cons {c |}{col 15}{res}{space 2} 2.299837{col 27}{space 2} .5017651{col 38}{space 1}    4.58{col 47}{space 3}0.000{col 55}{space 4} 1.315824{col 68}{space 3} 3.283849
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}
{com}. 
. log off
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/shanhe33/Dropbox/Durability_Gap_Data&Replication/bulb_numerical.smcl
  {txt}log type:  {res}smcl
 {txt}paused on:  {res}18 Jan 2024, 15:13:36
{txt}{.-}
{smcl}
{txt}{sf}{ul off}